package com.lyf.scm.plan.api.dto;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.lyf.scm.common.model.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;


/**
 * @Author: huangtao
 * @Description:
 * @Date: create in 2020/9/18
 */
@Data
@ApiModel("操作日志记录表")
public class OperationLogRecordDTO extends BaseDTO {

    @ApiModelProperty("主键id")
    private Long id;

    @ApiModelProperty("操作内容")
    private String opContent;

    @ApiModelProperty("操作状态(0-处理中、1-成功、2-失败)")
    private Integer opStatus;

    @ApiModelProperty("1导出，2导入")
    private String opType;

    @ApiModelProperty("操作数据源  1.直营预测计划2. 需求计划 3.销售计划 4.其他渠道计划")
    private Integer opSource;

    @ApiModelProperty("导出时存文件路径")
    private String ext;

    @ApiModelProperty("操作用时")
    private String opTime;

    @ApiModelProperty("操作数量")
    private Long opAmount;

    @ApiModelProperty("失败原因")
    private String failReason;

    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "开始时间不能为空")
    private Date startTime;

    @ApiModelProperty(value = "结束时间")
    private Date opEndTime;
}
